package com.zeus.service;

import com.zeus.mapper.AddressMapper;
import com.zeus.pojo.Address;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 冯扬龙
 * @date 2021/4/20 15:03
 */
@Service
public class AddressServiceImpl implements AddressService{

    @Autowired
    private AddressMapper addressMapper;

    public List<Address> submitOrder(int userId) {
        return addressMapper.submitOrder(userId);
    }

//根据前端传来的orderId,返回address对象,查询指定的订单地址
    public Address selectAddressByOrderId(int orderId) {
       return addressMapper.selectAddressByOrderId(orderId);
    }
}
